<#include "../../../common/freemarker/macro_i18n.ftl">
<div  id=div_smtp_table>
    <table   class="table table-condensed  table-indie" width=800>

	    <thead>
			<tr>
			    <th width=25px >ID</th>
			    <th width=100><@i18n "title_mail" />发送者</th>
			    <th  width=150><@i18n "title_title" />标题</th>
			    <th width=100><@i18n "title_mail_server" />主机</th>
			    <th  width=100><@i18n "title_mail_port" />端口</th>
			    <th  width=150><@i18n "title_mail_account" />帐号</th>
			    <th  width=150><@i18n "title_mail_password" />密码</th>
			    <th  width=100><@i18n "title_operation" />操作</th></tr>
			</tr>
		</thead>
		<tbody>
		<#list rhs["dataList"]?sort_by("sortNob") as x>
			<tr>
				<td class=nob >
					${x_index+1}
				</td>		
					<td onmouseover="rowOver(this)" onmouseout="rowOut(this)"><input  type="text" style="width:140px" value='${x.sender?if_exists}' onchange="javascript:ajax_smtp('${x.id}','sender',this.value)" /></td>
					<td onmouseover="rowOver(this)" onmouseout="rowOut(this)"><input  type="text" style="width:140px" value='${x.title?if_exists}'  onchange="javascript:ajax_smtp('${x.id}','title',this.value)" /></td>
					<td onmouseover="rowOver(this)" onmouseout="rowOut(this)"><input  type="text" style="width:140px" value='${x.host?if_exists}'  onchange="javascript:ajax_smtp('${x.id}','host',this.value)" /></td>
					<td onmouseover="rowOver(this)" onmouseout="rowOut(this)"><input  type="text" style="width:60px" value='${x.port?if_exists}' onchange="javascript:ajax_smtp('${x.id}','port',this.value)" /></td>
					<td onmouseover="rowOver(this)" onmouseout="rowOut(this)"><input  type="text" style="width:140px" value='${x.account?if_exists}'  onchange="javascript:ajax_smtp('${x.id}','account',this.value)" /></td>
					<td onmouseover="rowOver(this)" onmouseout="rowOut(this)"><input  type="text" style="width:140px" value='${x.passwd?if_exists}'  onchange="javascript:ajax_smtp('${x.id}','passwd',this.value)" /></td>
				<td style="width:50px">
					<#--<a href=# onclick="javascript:action_smtp('delete.do','id=${x.id}')" title="删除">删除</a>-->
					    <a title="DeleteNode" onclick="javascript:action_smtp('delete.do','id=${x.id}');" class="btn btn-xs btn-default"  title=Delete ><span class="fa fa-trash-o"></span></a>
					    <#if (rhs["dataList"]?size!=1)>
						    <#if (x_index?string=="0")> 
								<a  onclick="javascript:action_smtp('change_rank.do','id_from=${x.id?if_exists}&id_to=${rhs["dataList"]?sort_by("sortNob")[x_index+1].id}')"  class="ui-icon ui-icon-arrowthick-1-s" title=MoveUp></a>
							<#else>
								<a  onclick="javascript:action_smtp('change_rank.do','id_from=${x.id?if_exists}&id_to=${rhs["dataList"]?sort_by("sortNob")[x_index-1].id}')"  class="ui-icon ui-icon-arrowthick-1-n" title=MoveDown></a>
						    	<#if x_has_next>
					 	 			<a  onclick="javascript:action_smtp('change_rank.do','id_from=${x.id?if_exists}&id_to=${rhs["dataList"]?sort_by("sortNob")[x_index+1].id}')"  class="ui-icon ui-icon-arrowthick-1-s" title=MoveDown></a>
						        </#if>
						 	</#if> 				
					    </#if> 				
				</td>
			</tr>
		</#list> 
		</tbody>
	</table>            
	
</div>
<span id="div_action_result" style="display:none">${rhs["info"]?if_exists}</span>
